<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>题目列表</title>
</head>
<body>
<h1>题目列表</h1>
<table>
    <tr>
        <th>ID</th>
        <th>课程名称</th>
        <th>类型</th>
        <th>操作</th>
    </tr>
    <tr th:each="question : ${questions}">
        <td th:text="${question.questionId}"></td>
        <td th:text="${question.courseName}"></td>
        <td th:text="${question.type}"></td>
        <td>
            <a th:href="@{/question/edit/{id}(id=${question.questionId})}">编辑</a>
            <a th:href="@{/question/delete/{id}(id=${question.questionId})}">删除</a>
        </td>
    </tr>
</table>
<a href="/question/add">添加题目</a>
</body>
</html>